<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.List" %>
    <%@ page import="java.util.ArrayList" %>
    <%@ page import="com.demo.SessionStore" %>
    <%@ page import="com.DAO.*" %>
    <%@ page import="com.bean.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的帖子</title>
<!-- 新 Bootstrap 核心 CSS 文件 -->
  <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="page-header" style="margin:0;padding:0">
    <h1>我的帖子
        <small><a href='main.jsp'>返回首页</a></small>
    </h1>
	</div>
  <table class="table">
  <thead>
    <tr>
      <th>标题</th>
      <th>审核</th>
      <th>日期</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
  	<% 
  		List<Tie> tieinfor = (List<Tie>)session.getAttribute(SessionStore.SESSION_TIE);
  		if(tieinfor==null || tieinfor.size()<1){
  	%>
  		<tr>
  			<td>暂无数据</td>
  		</tr>
  	<%}else{
  		for(Tie tie:tieinfor){
  		%>
  		<tr>
  			<td><%=tie.getTieTitle() %></td>
  			<td><%=tie.getTieState() %></td>
  			<td><%=tie.getTieDate() %></td>
  			<td><a href='http://localhost:8080/publishTie/DeleteTie?id=<%=tie.getTieID() %>'>删除</a></td>
  			<td><a href='http://localhost:8080/publishTie/LookMyTie?id=<%=tie.getTieID() %>&t=p'>查看</a></td>
  		</tr>
  	<%}} %>
  </tbody>
</table>
<div style="display:flex;justify-content:flex-end;position:relative;"><img src="./images/ties.gif" style="width:200px;height:200px; float:right;margin-right:20px;"></div>
</body>
</html>